package com.spic.business.train.trainInfoCourseware.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spic.business.train.trainInfoCourseware.mapper.TrainInfoCoursewareMapper;
import com.spic.business.train.trainInfoCourseware.domain.TrainInfoCourseware;
import com.spic.business.train.trainInfoCourseware.service.ITrainInfoCoursewareService;

/**
 * 培训信息_培训课件中间Service业务层处理
 * 
 * @author spic
 * @date 2021-10-21
 */
@Service
public class TrainInfoCoursewareServiceImpl implements ITrainInfoCoursewareService 
{
    @Autowired
    private TrainInfoCoursewareMapper trainInfoCoursewareMapper;

    /**
     * 查询培训信息_培训课件中间
     * 
     * @param id 培训信息_培训课件中间主键
     * @return 培训信息_培训课件中间
     */
    @Override
    public TrainInfoCourseware selectTrainInfoCoursewareById(String id)
    {
        return trainInfoCoursewareMapper.selectTrainInfoCoursewareById(id);
    }

    /**
     * 查询培训信息_培训课件中间列表
     * 
     * @param trainInfoCourseware 培训信息_培训课件中间
     * @return 培训信息_培训课件中间
     */
    @Override
    public List<TrainInfoCourseware> selectTrainInfoCoursewareList(TrainInfoCourseware trainInfoCourseware)
    {
        return trainInfoCoursewareMapper.selectTrainInfoCoursewareList(trainInfoCourseware);
    }

    /**
     * 新增培训信息_培训课件中间
     * 
     * @param trainInfoCourseware 培训信息_培训课件中间
     * @return 结果
     */
    @Override
    public int insertTrainInfoCourseware(TrainInfoCourseware trainInfoCourseware)
    {
        return trainInfoCoursewareMapper.insertTrainInfoCourseware(trainInfoCourseware);
    }

    /**
     * 修改培训信息_培训课件中间
     * 
     * @param trainInfoCourseware 培训信息_培训课件中间
     * @return 结果
     */
    @Override
    public int updateTrainInfoCourseware(TrainInfoCourseware trainInfoCourseware)
    {
        return trainInfoCoursewareMapper.updateTrainInfoCourseware(trainInfoCourseware);
    }

    /**
     * 批量删除培训信息_培训课件中间
     * 
     * @param ids 需要删除的培训信息_培训课件中间主键
     * @return 结果
     */
    @Override
    public int deleteTrainInfoCoursewareByIds(String[] ids)
    {
        return trainInfoCoursewareMapper.deleteTrainInfoCoursewareByIds(ids);
    }

    /**
     * 删除培训信息_培训课件中间信息
     * 
     * @param id 培训信息_培训课件中间主键
     * @return 结果
     */
    @Override
    public int deleteTrainInfoCoursewareById(String id)
    {
        return trainInfoCoursewareMapper.deleteTrainInfoCoursewareById(id);
    }
    /**
     * 根据培训信息id获取
     */
    @Override
    public List<TrainInfoCourseware> selectBytrainInfoId(String trainInfoId){
        return trainInfoCoursewareMapper.selectBytrainInfoId(trainInfoId);
    }
}
